// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.
#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]

/// Implements a client for the Secure Source Manager API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_securesourcemanager_v1::client::SecureSourceManager;
/// let client = SecureSourceManager::builder().build().await?;
/// // use `client` to make requests to the Secure Source Manager API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// Secure Source Manager API
///
/// Access Secure Source Manager instances, resources, and repositories.
///
/// # Configuration
///
/// To configure `SecureSourceManager` use the `with_*` methods in the type returned
/// by [builder()][SecureSourceManager::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://securesourcemanager.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::secure_source_manager::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::secure_source_manager::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `SecureSourceManager` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `SecureSourceManager` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct SecureSourceManager {
    inner: std::sync::Arc<dyn super::stub::dynamic::SecureSourceManager>,
}

impl SecureSourceManager {
    /// Returns a builder for [SecureSourceManager].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_securesourcemanager_v1::client::SecureSourceManager;
    /// let client = SecureSourceManager::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::secure_source_manager::ClientBuilder {
        gax::client_builder::internal::new_builder(
            super::builder::secure_source_manager::client::Factory,
        )
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::SecureSourceManager + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::SecureSourceManager>>
    {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::SecureSourceManager> {
        super::transport::SecureSourceManager::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::SecureSourceManager> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::SecureSourceManager::new)
    }

    /// Lists Instances in a given project and location.
    pub fn list_instances(&self) -> super::builder::secure_source_manager::ListInstances {
        super::builder::secure_source_manager::ListInstances::new(self.inner.clone())
    }

    /// Gets details of a single instance.
    pub fn get_instance(&self) -> super::builder::secure_source_manager::GetInstance {
        super::builder::secure_source_manager::GetInstance::new(self.inner.clone())
    }

    /// Creates a new instance in a given project and location.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_instance(&self) -> super::builder::secure_source_manager::CreateInstance {
        super::builder::secure_source_manager::CreateInstance::new(self.inner.clone())
    }

    /// Deletes a single instance.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_instance(&self) -> super::builder::secure_source_manager::DeleteInstance {
        super::builder::secure_source_manager::DeleteInstance::new(self.inner.clone())
    }

    /// Lists Repositories in a given project and location.
    ///
    /// The instance field is required in the query parameter for requests using
    /// the securesourcemanager.googleapis.com endpoint.
    pub fn list_repositories(&self) -> super::builder::secure_source_manager::ListRepositories {
        super::builder::secure_source_manager::ListRepositories::new(self.inner.clone())
    }

    /// Gets metadata of a repository.
    pub fn get_repository(&self) -> super::builder::secure_source_manager::GetRepository {
        super::builder::secure_source_manager::GetRepository::new(self.inner.clone())
    }

    /// Creates a new repository in a given project and location.
    ///
    /// The Repository.Instance field is required in the request body for requests
    /// using the securesourcemanager.googleapis.com endpoint.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_repository(&self) -> super::builder::secure_source_manager::CreateRepository {
        super::builder::secure_source_manager::CreateRepository::new(self.inner.clone())
    }

    /// Updates the metadata of a repository.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_repository(&self) -> super::builder::secure_source_manager::UpdateRepository {
        super::builder::secure_source_manager::UpdateRepository::new(self.inner.clone())
    }

    /// Deletes a Repository.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_repository(&self) -> super::builder::secure_source_manager::DeleteRepository {
        super::builder::secure_source_manager::DeleteRepository::new(self.inner.clone())
    }

    /// Lists hooks in a given repository.
    pub fn list_hooks(&self) -> super::builder::secure_source_manager::ListHooks {
        super::builder::secure_source_manager::ListHooks::new(self.inner.clone())
    }

    /// Gets metadata of a hook.
    pub fn get_hook(&self) -> super::builder::secure_source_manager::GetHook {
        super::builder::secure_source_manager::GetHook::new(self.inner.clone())
    }

    /// Creates a new hook in a given repository.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_hook(&self) -> super::builder::secure_source_manager::CreateHook {
        super::builder::secure_source_manager::CreateHook::new(self.inner.clone())
    }

    /// Updates the metadata of a hook.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_hook(&self) -> super::builder::secure_source_manager::UpdateHook {
        super::builder::secure_source_manager::UpdateHook::new(self.inner.clone())
    }

    /// Deletes a Hook.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_hook(&self) -> super::builder::secure_source_manager::DeleteHook {
        super::builder::secure_source_manager::DeleteHook::new(self.inner.clone())
    }

    /// Get IAM policy for a repository.
    pub fn get_iam_policy_repo(&self) -> super::builder::secure_source_manager::GetIamPolicyRepo {
        super::builder::secure_source_manager::GetIamPolicyRepo::new(self.inner.clone())
    }

    /// Set IAM policy on a repository.
    pub fn set_iam_policy_repo(&self) -> super::builder::secure_source_manager::SetIamPolicyRepo {
        super::builder::secure_source_manager::SetIamPolicyRepo::new(self.inner.clone())
    }

    /// Test IAM permissions on a repository.
    /// IAM permission checks are not required on this method.
    pub fn test_iam_permissions_repo(
        &self,
    ) -> super::builder::secure_source_manager::TestIamPermissionsRepo {
        super::builder::secure_source_manager::TestIamPermissionsRepo::new(self.inner.clone())
    }

    /// CreateBranchRule creates a branch rule in a given repository.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_branch_rule(&self) -> super::builder::secure_source_manager::CreateBranchRule {
        super::builder::secure_source_manager::CreateBranchRule::new(self.inner.clone())
    }

    /// ListBranchRules lists branch rules in a given repository.
    pub fn list_branch_rules(&self) -> super::builder::secure_source_manager::ListBranchRules {
        super::builder::secure_source_manager::ListBranchRules::new(self.inner.clone())
    }

    /// GetBranchRule gets a branch rule.
    pub fn get_branch_rule(&self) -> super::builder::secure_source_manager::GetBranchRule {
        super::builder::secure_source_manager::GetBranchRule::new(self.inner.clone())
    }

    /// UpdateBranchRule updates a branch rule.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_branch_rule(&self) -> super::builder::secure_source_manager::UpdateBranchRule {
        super::builder::secure_source_manager::UpdateBranchRule::new(self.inner.clone())
    }

    /// DeleteBranchRule deletes a branch rule.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_branch_rule(&self) -> super::builder::secure_source_manager::DeleteBranchRule {
        super::builder::secure_source_manager::DeleteBranchRule::new(self.inner.clone())
    }

    /// Creates a pull request.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_pull_request(&self) -> super::builder::secure_source_manager::CreatePullRequest {
        super::builder::secure_source_manager::CreatePullRequest::new(self.inner.clone())
    }

    /// Gets a pull request.
    pub fn get_pull_request(&self) -> super::builder::secure_source_manager::GetPullRequest {
        super::builder::secure_source_manager::GetPullRequest::new(self.inner.clone())
    }

    /// Lists pull requests in a repository.
    pub fn list_pull_requests(&self) -> super::builder::secure_source_manager::ListPullRequests {
        super::builder::secure_source_manager::ListPullRequests::new(self.inner.clone())
    }

    /// Updates a pull request.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_pull_request(&self) -> super::builder::secure_source_manager::UpdatePullRequest {
        super::builder::secure_source_manager::UpdatePullRequest::new(self.inner.clone())
    }

    /// Merges a pull request.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn merge_pull_request(&self) -> super::builder::secure_source_manager::MergePullRequest {
        super::builder::secure_source_manager::MergePullRequest::new(self.inner.clone())
    }

    /// Opens a pull request.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn open_pull_request(&self) -> super::builder::secure_source_manager::OpenPullRequest {
        super::builder::secure_source_manager::OpenPullRequest::new(self.inner.clone())
    }

    /// Closes a pull request without merging.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn close_pull_request(&self) -> super::builder::secure_source_manager::ClosePullRequest {
        super::builder::secure_source_manager::ClosePullRequest::new(self.inner.clone())
    }

    /// Lists a pull request's file diffs.
    pub fn list_pull_request_file_diffs(
        &self,
    ) -> super::builder::secure_source_manager::ListPullRequestFileDiffs {
        super::builder::secure_source_manager::ListPullRequestFileDiffs::new(self.inner.clone())
    }

    /// Fetches a tree from a repository.
    pub fn fetch_tree(&self) -> super::builder::secure_source_manager::FetchTree {
        super::builder::secure_source_manager::FetchTree::new(self.inner.clone())
    }

    /// Fetches a blob from a repository.
    pub fn fetch_blob(&self) -> super::builder::secure_source_manager::FetchBlob {
        super::builder::secure_source_manager::FetchBlob::new(self.inner.clone())
    }

    /// Creates an issue.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_issue(&self) -> super::builder::secure_source_manager::CreateIssue {
        super::builder::secure_source_manager::CreateIssue::new(self.inner.clone())
    }

    /// Gets an issue.
    pub fn get_issue(&self) -> super::builder::secure_source_manager::GetIssue {
        super::builder::secure_source_manager::GetIssue::new(self.inner.clone())
    }

    /// Lists issues in a repository.
    pub fn list_issues(&self) -> super::builder::secure_source_manager::ListIssues {
        super::builder::secure_source_manager::ListIssues::new(self.inner.clone())
    }

    /// Updates a issue.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_issue(&self) -> super::builder::secure_source_manager::UpdateIssue {
        super::builder::secure_source_manager::UpdateIssue::new(self.inner.clone())
    }

    /// Deletes an issue.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_issue(&self) -> super::builder::secure_source_manager::DeleteIssue {
        super::builder::secure_source_manager::DeleteIssue::new(self.inner.clone())
    }

    /// Opens an issue.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn open_issue(&self) -> super::builder::secure_source_manager::OpenIssue {
        super::builder::secure_source_manager::OpenIssue::new(self.inner.clone())
    }

    /// Closes an issue.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn close_issue(&self) -> super::builder::secure_source_manager::CloseIssue {
        super::builder::secure_source_manager::CloseIssue::new(self.inner.clone())
    }

    /// Gets a pull request comment.
    pub fn get_pull_request_comment(
        &self,
    ) -> super::builder::secure_source_manager::GetPullRequestComment {
        super::builder::secure_source_manager::GetPullRequestComment::new(self.inner.clone())
    }

    /// Lists pull request comments.
    pub fn list_pull_request_comments(
        &self,
    ) -> super::builder::secure_source_manager::ListPullRequestComments {
        super::builder::secure_source_manager::ListPullRequestComments::new(self.inner.clone())
    }

    /// Creates a pull request comment. This function is used to create a single
    /// PullRequestComment of type Comment, or a single PullRequestComment of type
    /// Code that's replying to another PullRequestComment of type Code. Use
    /// BatchCreatePullRequestComments to create multiple PullRequestComments for
    /// code reviews.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_pull_request_comment(
        &self,
    ) -> super::builder::secure_source_manager::CreatePullRequestComment {
        super::builder::secure_source_manager::CreatePullRequestComment::new(self.inner.clone())
    }

    /// Updates a pull request comment.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_pull_request_comment(
        &self,
    ) -> super::builder::secure_source_manager::UpdatePullRequestComment {
        super::builder::secure_source_manager::UpdatePullRequestComment::new(self.inner.clone())
    }

    /// Deletes a pull request comment.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_pull_request_comment(
        &self,
    ) -> super::builder::secure_source_manager::DeletePullRequestComment {
        super::builder::secure_source_manager::DeletePullRequestComment::new(self.inner.clone())
    }

    /// Batch creates pull request comments. This function is used to create
    /// multiple PullRequestComments for code review. There needs to be exactly one
    /// PullRequestComment of type Review, and at most 100 PullRequestComments of
    /// type Code per request. The Postition of the code comments must be unique
    /// within the request.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn batch_create_pull_request_comments(
        &self,
    ) -> super::builder::secure_source_manager::BatchCreatePullRequestComments {
        super::builder::secure_source_manager::BatchCreatePullRequestComments::new(
            self.inner.clone(),
        )
    }

    /// Resolves pull request comments. A list of PullRequestComment names must be
    /// provided. The PullRequestComment names must be in the same conversation
    /// thread. If auto_fill is set, all comments in the conversation thread will
    /// be resolved.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn resolve_pull_request_comments(
        &self,
    ) -> super::builder::secure_source_manager::ResolvePullRequestComments {
        super::builder::secure_source_manager::ResolvePullRequestComments::new(self.inner.clone())
    }

    /// Unresolves pull request comments. A list of PullRequestComment names must
    /// be provided. The PullRequestComment names must be in the same conversation
    /// thread. If auto_fill is set, all comments in the conversation thread will
    /// be unresolved.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn unresolve_pull_request_comments(
        &self,
    ) -> super::builder::secure_source_manager::UnresolvePullRequestComments {
        super::builder::secure_source_manager::UnresolvePullRequestComments::new(self.inner.clone())
    }

    /// Creates an issue comment.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_issue_comment(
        &self,
    ) -> super::builder::secure_source_manager::CreateIssueComment {
        super::builder::secure_source_manager::CreateIssueComment::new(self.inner.clone())
    }

    /// Gets an issue comment.
    pub fn get_issue_comment(&self) -> super::builder::secure_source_manager::GetIssueComment {
        super::builder::secure_source_manager::GetIssueComment::new(self.inner.clone())
    }

    /// Lists comments in an issue.
    pub fn list_issue_comments(&self) -> super::builder::secure_source_manager::ListIssueComments {
        super::builder::secure_source_manager::ListIssueComments::new(self.inner.clone())
    }

    /// Updates an issue comment.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_issue_comment(
        &self,
    ) -> super::builder::secure_source_manager::UpdateIssueComment {
        super::builder::secure_source_manager::UpdateIssueComment::new(self.inner.clone())
    }

    /// Deletes an issue comment.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_issue_comment(
        &self,
    ) -> super::builder::secure_source_manager::DeleteIssueComment {
        super::builder::secure_source_manager::DeleteIssueComment::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::secure_source_manager::ListLocations {
        super::builder::secure_source_manager::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::secure_source_manager::GetLocation {
        super::builder::secure_source_manager::GetLocation::new(self.inner.clone())
    }

    /// Sets the access control policy on the specified resource. Replaces
    /// any existing policy.
    ///
    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
    /// errors.
    pub fn set_iam_policy(&self) -> super::builder::secure_source_manager::SetIamPolicy {
        super::builder::secure_source_manager::SetIamPolicy::new(self.inner.clone())
    }

    /// Gets the access control policy for a resource. Returns an empty policy
    /// if the resource exists and does not have a policy set.
    pub fn get_iam_policy(&self) -> super::builder::secure_source_manager::GetIamPolicy {
        super::builder::secure_source_manager::GetIamPolicy::new(self.inner.clone())
    }

    /// Returns permissions that a caller has on the specified resource. If the
    /// resource does not exist, this will return an empty set of
    /// permissions, not a `NOT_FOUND` error.
    ///
    /// Note: This operation is designed to be used for building
    /// permission-aware UIs and command-line tools, not for authorization
    /// checking. This operation may "fail open" without warning.
    pub fn test_iam_permissions(
        &self,
    ) -> super::builder::secure_source_manager::TestIamPermissions {
        super::builder::secure_source_manager::TestIamPermissions::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::secure_source_manager::ListOperations {
        super::builder::secure_source_manager::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::secure_source_manager::GetOperation {
        super::builder::secure_source_manager::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::secure_source_manager::DeleteOperation {
        super::builder::secure_source_manager::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::secure_source_manager::CancelOperation {
        super::builder::secure_source_manager::CancelOperation::new(self.inner.clone())
    }
}
